package top.zlcode.api.config;

import feign.codec.Encoder;
import feign.form.spring.SpringFormEncoder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class FeignMultipartConfig {

    /**
     * 配置Feign支持文件上传
     */
    @Bean
    public Encoder feignEncoder() {
        // SpringFormEncoder实现了feign.codec.Encoder接口，此处类型匹配
        return new SpringFormEncoder();
    }
}
